<template>
  <div class="home">
    <van-search
      v-model="value"
      shape="round"
      placeholder="请输入搜索关键词"
      disabled
    />
    <!-- <div class="box">文字大小</div> -->
    <!-- <p></p> -->

    <!-- 首页banner轮播图 -->
    <van-swipe class="my-swipe" :autoplay="3000" indicator-color="#1989fa">
      <van-swipe-item v-for="item in banner" :key="item.id">
        <img :src="item.image_url" alt="" width="100%" />
      </van-swipe-item>
    </van-swipe>

  </div>

</template>

<script>
// @ is an alias to /src
// import HelloWorld from '@/components/HelloWorld.vue
// import axios from "axios";
import instance from "../request/request";

import { GetHomeData } from "../request/api";
export default {
  name: "Home",
  data() {
    return {
      banner:[],
      value: "",
      searchVal: "",
    };
  },

  created() {
    GetHomeData()
      // instance
      //   .get("/index/index")
      .then((res) => {
        // console.log(3333);
        let {banner}=res.data
        this.banner=banner
        console.log(res);
      })
      .catch((err) => {
        console.log(err);
      });
  },
  components: {},
};
</script>
